package top.tec.listener;

import lombok.extern.slf4j.Slf4j;
import org.redisson.api.listener.MessageListener;
import org.springframework.stereotype.Service;
import top.tec.annocation.RedisTopic;

/**
 * @author hujincheng
 * @description 注解式实现的监听器
 * @create 2024-07-09 16:05
 */
@Service
@Slf4j
@RedisTopic(topic = "annoTopic")
public class AnnoTopicListener01 implements MessageListener<String> {

    @Override
    public void onMessage(CharSequence channel, String msg) {
        log.info("监听消息(Redis 发布/订阅): {}", msg);
    }
}
